package com.xgx.distqcp.Common;

import com.mongodb.Mongo;
import com.mongodb.MongoClient;
import com.xgx.distqcp.Common.MongoDBHelper;
import org.junit.Assert;
import org.junit.Test;
import org.junit.Before; 
import org.junit.After; 

/** 
* MongoDBHelper Tester. 
* 
* @author <Authors name> 
* @since <pre>十月 23, 2017</pre> 
* @version 1.0 
*/ 
public class MongoDBHelperTest { 

@Before
public void before() throws Exception { 
} 

@After
public void after() throws Exception { 
} 

/** 
* 
* Method: Test() 
* 
*/ 
@Test
public void testTest() throws Exception { 
//TODO: Test goes here... 
} 

/** 
* 
* Method: Connect(String Ip, int Port) 
* 
*/ 
@Test
public void testConnectForIpPort() throws Exception { 
//TODO: Test goes here...
} 

/** 
* 
* Method: Connect() 
* 
*/ 
@Test
public void testConnect() throws Exception { 
//TODO: Test goes here...
    MongoClient a=MongoDBHelper.Connect();
    Assert.assertNotNull(a);

} 


/** 
* 
* Method: printResult(String find_all, FindIterable<Document> iterable) 
* 
*/ 
@Test
public void testPrintResult() throws Exception { 
//TODO: Test goes here... 
/* 
try { 
   Method method = MongoDBHelper.getClass().getMethod("printResult", String.class, FindIterable<Document>.class); 
   method.setAccessible(true); 
   method.invoke(<Object>, <Parameters>); 
} catch(NoSuchMethodException e) { 
} catch(IllegalAccessException e) { 
} catch(InvocationTargetException e) { 
} 
*/ 
} 

} 
